Repository navigation
Conversation
When the reader of a configured verifier fails at startup, the task treated its address as unknown and ignored it. The message could then become SUCCESS without the verifications of that verifier. Mark the issuer addresses of a skipped verifier as unavailable in the verifier registry. The task counts them as unavailable CCVs, so the message retries until the deadline. With more than one replica, a replica with a failed reader no longer settles the message too early. An address that is in no verifier config is still unknown, as before.
7d702a9 to
7e76d02
Compare
| ### Unavailable CCVs include unstarted verifiers | ||
|
|
||
| - `Task.loadVerifierReaders` returns a fourth list: the addresses that are configured but have no started reader. | ||
| - `Execute` adds these addresses to `TaskResult.UnavailableCCVs`. The worker retries a message while `UnavailableCCVs > 0`. |
There was a problem hiding this comment.
In what situation would we have a case of unavailable CCVs in practice? Seems like it would be very rare? Looking at the bootup toml code unknown Type is already rejected. deduplication is also done so there won't be duplicates. so most likely the error will be due to invalid Issuer address if they are hand-typed in the config. But even that comes from datastore
I generally agree that marking UNAVAILABLE is better than not even registering. But doesn't this open a silent delay in messages if there is a misconfigured verifier config. Because all messages will continue to retry until timeout because the verifier is unavailable. Would be nicer if this is caught before boot (like reject the toml invalid error)
There was a problem hiding this comment.
Yes that's a good callout, we should catch as much as we can early in the config validation and only have unavailable in exceptional case. We should be loud about it if it ever happen so will add the metric there as well
| "missing", len(missing), | ||
| "attempting", len(attemptingToRetrieve), | ||
| "unknown", len(unknownCCVs), | ||
| "unstarted", len(unstarted), |
There was a problem hiding this comment.
Some metric/alerting would be nice so that we know if/when and how many messages are blocked due to unstarted verifier
|
Code coverage report:
|
When the reader of a configured verifier fails at startup, the task treated its address as unknown and ignored it. The message could then become SUCCESS without the verifications of that verifier.
Mark the issuer addresses of a skipped verifier as unavailable in the verifier registry. The task counts them as unavailable CCVs, so the message retries until the deadline. With more than one replica, a replica with a failed reader no longer settles the message too early.
An address that is in no verifier config is still unknown, as before.